home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / DFW.CMD < prev    next >
Encoding:
Text File  |  1996-02-16  |  1.5 KB  |  90 lines

  1. #    Login.cmd for DFW
  2. #
  3. #trace on
  4. #
  5. # set up some strings for dialling up
  6. #
  7. if ![load $number]
  8.   if [query $number "Enter your dial up phone number"]
  9.     save $number
  10.   end
  11. end
  12. if ![load $lusername]
  13.   if [query $lusername "Enter your login username"]
  14.     save $lusername
  15.   end
  16. end
  17. if ![load $lpw]
  18.   if [query $lpw "Enter your login password"]
  19.     save $lpw
  20.   end
  21. end
  22. if ![load $modemsetup]
  23.   if [query $modemsetup "Enter your modem setup string"]
  24.     save $modemsetup
  25.   end
  26. end
  27. # $modemsetup = "&f"
  28. $userprompt = "gin:"
  29. $passprompt = "word:"
  30.  
  31. %attempts = 10
  32. #
  33. #
  34. #----------------------------------------------------------
  35. #
  36. # initialize modem
  37. #
  38. output "atz"\13
  39. if ! [input 10 OK\n]
  40.   display "Modem is not responding"\n
  41.   abort
  42. end
  43. #
  44. # setup our modem commands
  45. #
  46. output $modemsetup\13
  47. input 10 OK\n
  48. #
  49. # send phone number
  50. #
  51. %n = 0
  52. repeat
  53.   if %n = %attempts
  54.     display "Too many dial attempts"\n
  55.     abort
  56.   end
  57.   output "atdt"$number\13
  58.   %ok = [input 60 CONNECT]
  59.   %n = %n + 1
  60. until %ok
  61. input 10 \n
  62. #
  63. #  wait till it's safe to send because some modem's hang up
  64. #  if you transmit during the connection phase
  65. #
  66. #wait 30 dcd
  67. #
  68. # now prod the terminal server
  69. #
  70. output \13
  71. #
  72. #  wait for the username prompt
  73. #
  74. input 30 $userprompt
  75. output $lusername\13
  76. #
  77. # and the password
  78. #
  79. input 30 $passprompt
  80. output $lpw\13
  81. #
  82. # we are now logged in
  83. #
  84. display "Connected to DFW"\13
  85. sleep 3
  86. end
  87. #
  88. # now we are finished.
  89. #
  90.